package com.re6g3y.game.entity;

import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.MathUtils;
import com.re6g3y.game.entity.func.Drawable;

public class TextureEntity implements Drawable {
    protected Sprite sprite=null;

    protected float angle=0;

    public void draw(Batch batch){
        sprite.setRotation(MathUtils.radiansToDegrees*(angle + MathUtils.PI));
        sprite.draw(batch);
    }

    public void setSprite(Sprite sprite) {
        this.sprite = sprite;
    }

    /**
     * angle is radians
     * @param angle
     */
    public void setAngle(float angle) {
        this.angle = angle;
    }

}
